package eight.test_8_31;

import java.util.Scanner;

public class TestMain1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int[] hash = new int[26];
        String str = scanner.nextLine();
        boolean allZs = true;
        for (char c : str.toCharArray()) {
            if(c != 'z') {
                allZs = false;
                break;
            }
        }
        if (allZs) {
            System.out.println(-1);
            return;
        }
        int index = str.length() - 1;
        while (str.charAt(index) == 'z') {
            index--;
        }
        char[] chars = str.toCharArray();
        chars[index] = (char) (chars[index] + 1);
        for (int i = index + 1; i < chars.length; i++) {
            chars[i] = 'a';
        }
        System.out.println(new String(chars));
    }
}
